package swordoffer.offer03;

public class Solution3 {
    public int findRepeatNumber(int[] nums) {
        //使用辅助数组
        int[] newNums = new int[nums.length];
        for (int i = 0; i < nums.length; i++) {
            newNums[nums[i]]++;
            if (newNums[nums[i]] > 1){
                return nums[i];
            }
        }
        return -1;
    }
}
